package com.sr.examination.net;

import com.tl.commonlibrary.network.bean.base.BaseBean;
import com.tl.commonlibrary.ui.beans.CoinBean;
import com.tl.commonlibrary.ui.beans.CollectionBean;
import com.tl.commonlibrary.ui.beans.ExamBean;
import com.tl.commonlibrary.ui.beans.ExamGrade;
import com.tl.commonlibrary.ui.beans.ExerciseListBean;
import com.tl.commonlibrary.ui.beans.HistoryBean;
import com.tl.commonlibrary.ui.beans.HomeBean;
import com.tl.commonlibrary.ui.beans.NewsBean;
import com.tl.commonlibrary.ui.beans.PicUploadInfoBean;
import com.tl.commonlibrary.ui.beans.RechargeBean;
import com.tl.commonlibrary.ui.beans.RechargeHistoryBean;
import com.tl.commonlibrary.ui.beans.User;
import com.tl.commonlibrary.ui.beans.VerifyCodeBean;
import com.tl.commonlibrary.ui.beans.WrongBean;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by jiangzhongshan on 18/2/5.
 */

public interface InterfaceService {
    @GET("/exam/v1/index")
    Call<BaseBean<HomeBean>> getHome(@QueryMap Map<String, Object> map);

    @POST("exam/v1/sms-auth-code")
    Call<BaseBean<VerifyCodeBean>> getVerifyCode(@Body RequestBody body);

    @POST("exam/v1/set-password")
    Call<BaseBean<User>> register(@Body RequestBody body);

    @POST("exam/v1/change-password")
    Call<BaseBean> resetPassword(@Body RequestBody body);

    @POST("exam/v1/login")
    Call<BaseBean<User>> login(@Body RequestBody body);

    @GET("exam/v1/user/info")
    Call<BaseBean<User>> getUserInfo(@QueryMap Map<String, Object> body);

    @POST("exam/v1/user/update-info")
    Call<BaseBean> postUserInfo(@Body RequestBody body);


    @GET("exam/v1/level/list")
    Call<BaseBean<ArrayList<ExamGrade>>> getExamGradeList(@QueryMap Map<String, Object> map);

    @POST("exam/v1/level/user-selected")
    Call<BaseBean> setExamGrade(@Body RequestBody body);

    @GET("exam/v1/paper/list")
    Call<BaseBean<ArrayList<ExamBean>>> getExamList(@QueryMap Map<String, Object> map);

    @GET("exam/v1/paper/likes-item-list")
    Call<BaseBean<ExerciseListBean>> getExerciseCollectionList(@QueryMap Map<String, Object> map);

    @GET("exam/v1/paper/wrong-item-list")
    Call<BaseBean<ExerciseListBean>> getExerciseWrongList(@QueryMap Map<String, Object> map);

    @GET("exam/v1/paper/trial")
    Call<BaseBean<ExerciseListBean>> getExerciseTrailList(@QueryMap Map<String, Object> map);

    @GET("exam/v1/paper/all-items")
    Call<BaseBean<ExerciseListBean>> getExerciseList(@QueryMap Map<String, Object> map);


    @GET("exam/v1/product/coins")
    Call<BaseBean<List<RechargeBean>>> getRechargeList(@QueryMap Map<String, Object> map);

    @POST("exam/v1/paper/likes")
    Call<BaseBean> collection(@Body RequestBody map);

    @GET("exam/v1/paper/likes-list")
    Call<BaseBean<ArrayList<CollectionBean>>> getCollectionList(@QueryMap Map<String, Object> map);

    @GET("exam/v1/paper/wrong-list")
    Call<BaseBean<ArrayList<WrongBean>>> getWrongList(@QueryMap Map<String, Object> map);

    @GET("exam/v1/user/purchase-history")
    Call<BaseBean<ArrayList<RechargeHistoryBean>>> getRechargeHistoryList(@QueryMap Map<String, Object> map);

    @POST("/exam/v1/paper/buy")
    Call<BaseBean<CoinBean>> examPurchase(@Body RequestBody body);

    @GET("/exam/v1/news/soft-instruction")
    Call<BaseBean<NewsBean>> getHelp(@QueryMap Map<String, Object> map);

    @GET("/exam/v1/news/list")
    Call<BaseBean<ArrayList<NewsBean>>> getNewestList(@QueryMap Map<String, Object> map);

    @GET("/exam/v1/news/detail")
    Call<BaseBean<NewsBean>> getNewsDetal(@QueryMap Map<String, Object> map);

    @POST("/exam/v1/paper/submit-answers")
    Call<BaseBean<ExerciseListBean>> submitExercise(@Body RequestBody body);

    @POST("/exam/v1/user/feedback")
    Call<BaseBean> feedback(@Body RequestBody body);

    @POST("/exam/v1/paper/batch-self-reported-score")
    Call<BaseBean> submitSubjectiveScore(@Body RequestBody body);

    @POST("/exam/v1/user/get-upload-url")
    Call<BaseBean<PicUploadInfoBean>> getUploadUrl(@Body RequestBody body);

    @GET("/exam/v1/paper/used-paper-list")
    Call<BaseBean<ArrayList<HistoryBean>>> getHistoryList(@QueryMap Map<String, Object> map);

    @GET("/exam/v1/paper/used-paper-detail")
    Call<BaseBean<ExerciseListBean>> getHistoryDetail(@QueryMap Map<String, Object> map);

    @POST("/exam/v1/logout")
    Call<BaseBean> logout(@Body RequestBody body);


}
